package cn.kingyang.yiyi.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jtech.view.RecyclerHolder;

import java.util.HashMap;

import cn.kingyang.yiyi.R;
import cn.kingyang.yiyi.ui.adapter.base.BaseAdapter;
import cn.kingyang.yiyi.utils.AppUtil;


/**
 * Created by Administrator on 2017/1/7.
 */

public class VideoPinglunAdapter extends BaseAdapter<HashMap<String, String>> {

    public VideoPinglunAdapter(Context context) {
        super(context);
    }

    @Override
    protected View createView(LayoutInflater layoutInflater, ViewGroup viewGroup, int i) {
        return layoutInflater.inflate(R.layout.item_pinglun,null);
    }

    @Override
    protected void convert(RecyclerHolder recyclerHolder, HashMap<String, String> info, int i) {
        AppUtil.initImage(getContext(),recyclerHolder.getView(R.id.pic),info.get("pic"));
        recyclerHolder.setText(R.id.name,info.get("name"));
        recyclerHolder.setText(R.id.msg,info.get("info"));
    }

}
